import Vue from "vue";
import VueRouter from "vue-router"
import discover from "@/pages/discover"
import friend from "@/pages/friend"
// 将VueRounter 注入到所有的Vue子组件
Vue.use(VueRouter)
// 路由配置routes
let routes = [
    {
        path: "/discover",
        component: discover
    },
    {
        path: "/friend/:aa",
        component: friend
    },
    {
        path: "/mine",
        component: () => import("@/pages/mine")
    },
    {
        path: "/list",
        component: () => import("@/pages/list")
    },
    {
        path: "/detail/:productid",
        props:true,
        component: () => import("@/pages/detail")
    }

]
// 实例化路由
let router = new VueRouter({
    routes
})
export default router
